<!-- Add "fixed" class to make the sidebar fixed always to the browser viewport. -->
<!-- Adding class "toggle-others" will keep only one menu item open at a time. -->
<!-- Adding class "collapsed" collapse sidebar root elements and show only icons. -->
<div class="sidebar-menu toggle-others fixed">

    <div class="sidebar-menu-inner">

        <header class="logo-env">

            <!-- logo -->
            <div class="logo">
                <a href="dashboard-1.html" class="logo-expanded">

                    <img class="my1logo" src="<?php echo $GLOBALS['config']['sitelogo'] ?>" onerror="this.error=null;this.src='<?php echo URLPRE;?>static/public/images/nologo.jpg'" style="max-height:80px;max-width:100%" alt="管理中心"/>
                </a>

                <a href="dashboard-1.html" class="logo-collapsed">

                    <img class="my1logo" src="<?php echo $GLOBALS['config']['sitelogo'] ?>" onerror="this.error=null;this.src='<?php echo URLPRE;?>static/public/images/nologo.jpg'" width="100%" alt="管理中心"/>
                </a>
            </div>

            <!-- This will toggle the mobile menu and will be visible only on mobile devices -->
            <div class="mobile-menu-toggle visible-xs">
                <a href="#" data-toggle="user-info-menu">
                    <i class="fa-bell-o"></i>
                    <span class="badge badge-success">7</span>
                </a>

                <a href="#" data-toggle="mobile-menu">
                    <i class="fa-bars"></i>
                </a>
            </div>

            <!-- This will open the popup with user profile settings, you can use for any purpose, just be creative -->
<!--            <div class="settings-icon">
                <a href="#" data-toggle="settings-pane" data-animate="true">
                    <i class="linecons-cog"></i>
                </a>
            </div>-->


        </header>



        <ul id="main-menu" class="main-menu">
            <!-- add class "multiple-expanded" to allow multiple submenus to open -->
            <!-- class "auto-inherit-active-class" will automatically add "active" class for parent elements who are marked already with class "active" -->
            <li class="active opened active">
                <a href="dashboard-1.html">
                    <i class="linecons-cog"></i>
                    <span class="title">微信设置</span>
                </a>
                <ul>
                     <li class="active">
                        <a href="<?php echo site_url('weixin/wiframe/onload/?page=link')?>">
                            <span class="title">连接公众号</span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo site_url('weixin/wiframe/onload/?page=menu')?>">
                            <span class="title">自定义菜单</span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo site_url('weixin/wfans/index')?>">
                            <span class="title">粉丝管理</span>
                        </a>
                    </li>
                    <li>
                             <a href="<?php echo site_url('weixin/wiframe/onload/?page=response_text')?>">
                            <span class="title">响应消息</span>
                             </a>
                    </li>
                    <li>
                        <a href="<?php echo site_url('weixin/wiframe/onload/?page=send')?>">
                            <span class="title">群发消息</span>
                        </a>
                    </li>
                    <!--<li>
                        <a href="dashboard-4.html">
                            <span class="title">微信支付</span>
                        </a>
                    </li>
                    <li>
                        <a href="dashboard-4.html">
                            <span class="title">微信客服</span>
                        </a>
                    </li>-->
                </ul>
            </li>
            <!--<li>
                <a href="ui-panels.html">
                    <i class="linecons-note"></i>
                    <span class="title">微店管理</span>
                </a>
                <ul>
                    <li>
                        <a href="<?php /*echo site_url('weixin/wiframe/onload/?page=shop_list')*/?>">
                            <span class="title">微店列表</span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php /*echo site_url('weixin/wiframe/onload/?page=add_shop')*/?>">
                            <span class="title">添加微店</span>
                        </a>
                    </li>
                </ul>
            </li>-->
            <li>
                <a href="<?php echo site_url('weixin/wiframe/onload/?page=weimingpian')?>">
                    <i class="linecons-note"></i>
                    <span class="title">微名片</span>
                </a>
            </li>
           <!-- <li>
                <a href="mailbox-main.html">
                    <i class="linecons-mail"></i>
                    <span class="title">订单管理</span>

                </a>
                <ul>
                    <li>
                        <a href="<?php /*echo site_url('weixin/worder/index')*/?>">
                            <span class="title">电话预定</span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php /*echo site_url('weixin/wiframe/onload/?page=weixin_order')*/?>">
                            <span class="title">手机订单</span>
                        </a>
                    </li>
                </ul>
            </li>-->
           <!-- <li>
                <a href="forms-native.html">
                    <i class="linecons-params"></i>
                    <span class="title">产品中心</span>

                </a>
                <ul>
                    <li>
                        <a href="<?php /*echo site_url('weixin/wiframe/onload/?page=line')*/?>">
                            <span class="title">线路</span>
                            
                        </a>
                    </li>
                     <li>
                        <a href="<?php /*echo site_url('weixin/wiframe/onload/?page=ticket')*/?>">
                            <span class="title">门票</span>
                        </a>
                    </li>
                </ul>
            </li>
            -->
            <li>
                <a href="charts-main.html">
                    <i class="linecons-globe"></i>
                    <span class="title">统计</span>
                </a>
                <ul>
                    <li>
                        <a href="<?php echo site_url('weixin/windex/index')?>">
                            <span class="title">概览</span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo site_url('weixin/windex/tj_order')?>">
                            <span class="title">订单</span>
                        </a>
                    </li>
                   <!-- <li>
                        <a href="<?php /*echo site_url('weixin/windex/tj_line')*/?>">
                            <span class="title">产品</span>
                        </a>
                    </li>-->

                    <!--<li>
                        <a href="<?php /*echo site_url('weixin/windex/tj_weidian')*/?>">
                            <span class="title">微店</span>
                        </a>
                    </li>-->
                    <li>
                        <a href="<?php echo site_url('weixin/windex/tj_weimingpian')?>">
                            <span class="title">微名片</span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo site_url('weixin/windex/tj_user')?>">
                            <span class="title">用户</span>
                        </a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="#">
                    <i class="linecons-database"></i>
                    <span class="title">营销活动</span>
                </a>
                <ul>
                    <li>
                        <a href="<?php echo site_url('weixin/actioninfo/index')?>">
                        	<span class="title">抽奖管理</span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo site_url('weixin/actioninfo_prize/index')?>">
                        	<span class="title">奖品管理</span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo site_url('weixin/actioninfo_result')?>">
                        	<span class="title">抽奖结果查询</span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo site_url('weixin/wiframe/onload/?page=vote')?>">
                            <span class="title">投票活动</span>
                        </a>
                    </li>
<!--                    <li>-->
<!--                        <a href="">-->
<!--                            <span class="title">红包</span>-->
<!--                        </a>-->
<!--                    </li>-->
                </ul>
            </li>
            <?php if($this->session->userdata('_ACCESS_LIST')=='ALL'){ ?>
            <li>
                <a href="#">
                    <i class="linecons-cloud"></i>
                    <span class="title">系统设置</span>
                </a>
                <ul>
                    <li>
                        <a href="<?php echo site_url('weixin/wiframe/onload/?page=division')?>">
                            <i class="entypo-flow-line"></i>
                            <span class="title">部门管理</span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo site_url('weixin/wiframe/onload/?page=adminuser')?>">
                            <i class="entypo-flow-line"></i>
                            <span class="title">管理员管理</span>
                        </a>
                    </li>
                    <li>
                        <a href="<?php echo site_url('weixin/wiframe/onload/?page=adminrole')?>">
                            <i class="entypo-flow-line"></i>
                            <span class="title">角色管理</span>
                        </a>
                    </li>
                </ul>
            </li>
            <?php } ?>
        </ul>

    </div>

</div>
<script>
var CURRENTURL = '<?php echo get_url();?>';
$('#main-menu').find('a').each(function(){
    var src = $(this).attr('href');
    if(src == CURRENTURL || CURRENTURL.indexOf(src) != -1){
        var $par = $(this).parent().parent().parent();
        $('#main-menu li').removeClass('opened').removeClass('active');
        $par.addClass('opened active');
        $(this).parent().addClass('active').siblings().removeClass('active');
    }
});
</script>